package engine;

public class GameManager {
	
	/* Constants describing the game title
	 * and the current version. (PA stands for
	 * pre-alpha.)
	 */
	public static final String STRING_GAME_TITLE = "Seeker";
	public static final String STRING_GAME_VERSION = "v0.0.01 (pa)";
	
	/* The game keeps running if this is true. */
	private boolean running = false;
	
	/* The actual game that his class manages. */
	private Game game;
	
	/* Starts the game */
	public void start() {
		init();
		loop();
	}
	
	/* Stops the game. */
	public synchronized void stop() {
		running = false;
	}

	/* Initialize start-up stuff here. 
	 * (Perhaps loading a previous save.) */
	public void init() {
		game = new Game(this);
	}
	
	/* The game loop. */
	public void loop() {
		running = true;
		while (running) {
			game.tick();
		}
	}
	
	/* Everything begins here.
	 * Creates a new instance of Game and
	 * starts it. */
	public static void main(String[] args) {
		new GameManager().start();
	}
}
